import {BaseModel} from "./BaseModel";

export enum ComponentType {
    DOCKER
}

export enum ComponentStatus {
    CREATED, READY, STARTING, RUNNING, STOPPING
}

export interface ComponentInfo {
    instanceId: string;

    imageId: string;

    status: ComponentStatus;

    health?: boolean;

    name: string;

    version: string;

    runningTime?: number;

    startAt?: number;

    endAt?: number;

    startBy?: string;

    endBy?: string;
}

export interface ComponentModel extends BaseModel {
    projectId: string;
    name: string;
    type: ComponentType;
    info: ComponentInfo;
}